<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>数据分析</title>
    <link rel="icon" href="../images/favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/materialdesignicons.min.css" rel="stylesheet">
    <link href="../css/style.min.css" rel="stylesheet">


</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">

            <!-- logo -->
            <div id="logo" class="sidebar-header">
                <a href="../../index.html"><img src="../images/logo-sidebar.png" title="LightYear" alt="LightYear" /></a>
            </div>
            <div class="lyear-layout-sidebar-scroll">

                <nav class="sidebar-main">
                    <ul class="nav nav-drawer">
                        <li class="nav-item active"> <a href="../../index.html"><i class="mdi mdi-home"></i> 后台首页</a> </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-palette"></i>垃圾桶</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="../binManage/allBins.html">所有垃圾桶</a> </li>
                                <li> <a href="../binManage/garbageCounts.html">垃圾数量查看</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-format-align-justify"></i> 数据展示</a>
                            <ul class="nav nav-subnav">
                                <li> <a href="../dataDisplay/trashData.html">垃圾桶</a> </li>
                                <li> <a href="../dataDisplay/garbageOfAll.html">垃圾总数</a> </li>
                                <li> <a href="../dataDisplay/packageGarbageNumber.html">打包数</a> </li>
                                <li> <a href="../dataDisplay/dataAnalysis.html">数据分析</a> </li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-file-outline"></i> 记录查看</a>
                            <ul class="nav nav-subnav">
                                <li><a href="../logs/logs.html">日志信息</a></li>
                                <li><a href="../logs/warning.html">预警记录</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>

                <div class="sidebar-footer">
                    <p class="copyright">Copyright &copy; 2021. <a target="_blank" href="https://gitee.com/abinabin2dd/garbage-sorting">垃圾分类后台管理系统</a> All rights reserved.</p>
                </div>
            </div>

        </aside>
        <!--End 左侧导航-->

        <!--头部信息-->
        <header class="lyear-layout-header">

            <nav class="navbar navbar-default">
                <div class="topbar">

                    <div class="topbar-left">
                        <div class="lyear-aside-toggler">
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                        </div>
                        <span class="navbar-page-title"> 后台首页 </span>
                    </div>

                    <ul class="topbar-right">
                        <li class="dropdown dropdown-profile">
                            <a href="javascript:void(0)" data-toggle="dropdown">
                                <img class="img-avatar img-avatar-48 m-r-10" src="../../pages/images/users/avatar.jpg" alt="笔下光年" />
                                <span>管理员 <span class="caret"></span></span>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li> <a href="lyear_pages_profile.html"><i class="mdi mdi-account"></i> 个人信息</a> </li>
                                <li> <a href="lyear_pages_edit_pwd.html"><i class="mdi mdi-lock-outline"></i> 修改密码</a> </li>
                                <li> <a href="javascript:void(0)"><i class="mdi mdi-delete"></i> 清空缓存</a></li>
                                <li class="divider"></li>
                                <li> <a href="lyear_pages_login.html"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
                            </ul>
                        </li>
                        <!--切换主题配色-->
                        <li class="dropdown dropdown-skin">
                            <span data-toggle="dropdown" class="icon-palette"><i class="mdi mdi-palette"></i></span>
                            <ul class="dropdown-menu dropdown-menu-right" data-stopPropagation="true">
                                <li class="drop-title"><p>主题</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="site_theme" value="default" id="site_theme_1" checked>
                    <label for="site_theme_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="site_theme" value="dark" id="site_theme_2">
                    <label for="site_theme_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="site_theme" value="translucent" id="site_theme_3">
                    <label for="site_theme_3"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>LOGO</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="logo_bg" value="default" id="logo_bg_1" checked>
                    <label for="logo_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_2" id="logo_bg_2">
                    <label for="logo_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_3" id="logo_bg_3">
                    <label for="logo_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_4" id="logo_bg_4">
                    <label for="logo_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_5" id="logo_bg_5">
                    <label for="logo_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_6" id="logo_bg_6">
                    <label for="logo_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_7" id="logo_bg_7">
                    <label for="logo_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="logo_bg" value="color_8" id="logo_bg_8">
                    <label for="logo_bg_8"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>头部</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="header_bg" value="default" id="header_bg_1" checked>
                    <label for="header_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_2" id="header_bg_2">
                    <label for="header_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_3" id="header_bg_3">
                    <label for="header_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_4" id="header_bg_4">
                    <label for="header_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_5" id="header_bg_5">
                    <label for="header_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_6" id="header_bg_6">
                    <label for="header_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_7" id="header_bg_7">
                    <label for="header_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="header_bg" value="color_8" id="header_bg_8">
                    <label for="header_bg_8"></label>
                  </span>
                                </li>
                                <li class="drop-title"><p>侧边栏</p></li>
                                <li class="drop-skin-li clearfix">
                  <span class="inverse">
                    <input type="radio" name="sidebar_bg" value="default" id="sidebar_bg_1" checked>
                    <label for="sidebar_bg_1"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_2" id="sidebar_bg_2">
                    <label for="sidebar_bg_2"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_3" id="sidebar_bg_3">
                    <label for="sidebar_bg_3"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_4" id="sidebar_bg_4">
                    <label for="sidebar_bg_4"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_5" id="sidebar_bg_5">
                    <label for="sidebar_bg_5"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_6" id="sidebar_bg_6">
                    <label for="sidebar_bg_6"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_7" id="sidebar_bg_7">
                    <label for="sidebar_bg_7"></label>
                  </span>
                                    <span>
                    <input type="radio" name="sidebar_bg" value="color_8" id="sidebar_bg_8">
                    <label for="sidebar_bg_8"></label>
                  </span>
                                </li>
                            </ul>
                        </li>
                        <!--切换主题配色-->
                    </ul>

                </div>
            </nav>

        </header>
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content" style="margin-top: 20px;float: left">
        <!-- 上半部分-->
            <div class="row">
                <div class="col-lg-6">
                    <div class="card">
                        <div class="card-header">
                            <h4>垃圾数据分析</h4>
                        </div>
                        <div class="card-body">
                            <canvas class="js-chartjs-pies"></canvas>
                        </div>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="card">
                        <div class="card-header">
                            <h5>垃圾数据分析总结</h5>
                        </div>
                        <div class="card-body">
                            <span style="color: #0FB25F">
                                <h3>可回收垃圾:</h3>
                                <p>
                                所有垃圾桶共回收123包可回收垃圾。
                                对于可回收垃圾，1吨废塑料可回炼600公斤的柴油。回收1500吨废纸，可免于砍伐用于生产1200吨纸的林木。
                                一吨易拉罐熔化后能结成一吨很好的铝块，可少采20吨铝矿。生活垃圾中有30%~40%可以回收利用，
                                应珍惜这个小本大利的资源。
                                </p>
                            </span>
                            <span style="color:red;">
                              <h3>有害垃圾:</h3>
                            <p>
                                所有垃圾桶共回收100包有害垃圾。
                                对于有害垃圾，对人体健康或者自然环境造成直接或者潜在危害
                            </p>
                            </span>
                            <span style="color:#00b0f6;">
                              <h3>厨余垃圾:</h3>
                            <p>
                                所有垃圾桶共回收99包厨余垃圾。
                                厨余垃圾含有极高的水分与有机物，很容易腐坏，产生恶臭。厨余垃圾经过回收处理后，不仅可以
                                优化居民生活环境、净化空气，还可以经过妥善处理和加工，可转化为新的资源，高有机物
                                含量的特点使其经过严格处理后可作为肥料、饲料，也可产生沼气用作燃料或发电，油脂部分则可用于制备生物燃料。
                            </p>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        <!--下半部分-->
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-header">
                            <h4>数据提示</h4>
                        </div>
                        <div class="card-body">


                            <div class="alert alert-danger alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <span>警告：8号宿舍楼区域，垃圾桶满载频繁，垃圾桶数量少，需要增加垃圾桶 </span>
                                <br>
                                <span>警告时间:2021年5月13日19:01:55</span>
                            </div>
                            <div class="alert alert-warning alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <span>预警:7号宿舍楼区域，垃圾桶即将满载，垃圾车需要及时清运 </span>
                                <br>
                                <span>预警时间:2021年5月13日19:02:54</span>
                            </div>
                            <div class="alert alert-success alert-dismissible" role="alert">
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <span>9号宿舍楼区域，空余垃圾桶过多，可以适当减少垃圾桶数量 </span>
                                <br>
                                <span>2021年5月13日19:02:58</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--消费水平查看-->
            <div class="row">
                <div class="col-lg-8">
                    <div class="card">
                        <div class="card-header">
                            <h5>居民消费趋势分析</h5>
                        </div>
                        <div class="card-body">
                            <canvas class="js-chartsjs-scatter"></canvas>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../js/main.min.js"></script>
<script type="text/javascript" src="../js/Chart.js"></script>
<script>
    $(document).ready(function (e) {
        // 饼图
        var $garbageCharPieCnt  = jQuery( '.js-chartjs-pies' )[0].getContext( '2d' );
        var $garbageCharPie = {
            labels: ['其他垃圾', '有害垃圾', '厨余垃圾', '可回收垃圾'],
            datasets: [
                {
                    label: '垃圾桶数量',
                    borderWidth: 1,
                    borderColor: 'rgba(0,0,0,0)',
                    backgroundColor: [
                        'rgb(195,128,0)',
                        'rgb(255,0,4)',
                        'rgb(87,199,212)',
                        'rgb(0,249,36)',
                    ],
                    hoverBorderColor: "rgba(0,0,0,0)",
                    data: [70, 100, 99, 123]
                }
            ]
        };
        new Chart($garbageCharPieCnt,{
            type:'pie',
            data:$garbageCharPie
        });
//综合折线图
        var $garbageCharScatterCnt = jQuery( '.js-chartsjs-scatter' )[0].getContext( '2d' );

        var $garbageCharScatterData = {
            labels: ['一月', '二月', '三月', '四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
            datasets: [
                {
                    type: 'line',
                    label: '饮料',
                    data: [250, 350, 250, 400,450, 850, 900, 850,800, 350, 300, 200],
                    borderColor: '#43c3d7',
                    backgroundColor: 'rgb(6,176,238)',
                    fill: false,
                    tension: 0.1
                }, {
                    type: 'line',
                    label: '零食',
                    data: [425, 420, 325, 340,400, 436, 438, 440,415, 420, 430, 440],
                    borderColor: '#d700ad',
                    backgroundColor: 'rgb(255,2,149)',
                    fill: false

                }, {
                    type: 'line',
                    label: '水果',
                    data: [615, 620, 625, 640,645, 636, 638, 640,615, 620, 630, 640],
                    borderColor: '#79ef47',
                    backgroundColor: 'rgb(83,243,117)',
                    fill: false

                }, {
                    type: 'line',
                    label: '快递包装',
                    data: [1400, 1320, 1325, 1340,1445, 1500, 1450, 1365,1265, 1230, 1450, 1550],
                    borderColor: '#6d6169',
                    backgroundColor: 'rgb(95,80,94)',
                    fill: false
                }
            ]
        };

        new Chart($garbageCharScatterCnt,{
            type: 'line',
            data:$garbageCharScatterData,
            options: {
                animations: {
                    tension: {
                        duration: 1000,
                        easing: 'linear',
                        from: 1,
                        to: 0,
                        loop: true
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true
                    },

                },
                plugins: {
                    title: {
                        display: true,
                        text: ''
                    }
                }
            }
        })
    })
</script>
</body>
</html>